<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{log_name} : {log_account_no}</title>
<link rel="shortcut icon" href="{dir_image}favicon.ico">
<link rel="stylesheet" type="text/css" href="{dir_css}Global.css" />
<link rel="stylesheet" type="text/css" href="{dir_css}Popup.css" />
<link rel="stylesheet" type="text/css" href="{dir_css}Dean.css" />

<script type="text/javascript" src="{dir_js}jquery.min.js"></script>
<script type="text/javascript" src="{dir_js}Global.js"></script>
<script type="text/javascript">

	function insertActiveSem(semID, courseID, headID, yearID, activeAction) {
		$('#checkbox_check'+semID).attr('src', '{dir_image}icon/loading_round.gif');
		$.post('request.php', {AJAXPost:'insertSemLinker', strSem:semID, strCourse:courseID, strHead:headID, strYear:yearID}, function() {
			window.location.href = window.location.href;
		});
		
	}
	
	function deleteActiveSem(semID) {
		$('#checkbox_check'+semID).attr('src', '{dir_image}icon/loading_round.gif');
		$.post('request.php', {AJAXPost:'deleteSemLinker', strSem:semID}, function() {
			window.location.href = window.location.href;
		});
		
	}
	
	function updateActiveSem(semID) {
		$('#checkbox_check'+semID).attr('src', '{dir_image}icon/loading_round.gif');
		$.post('request.php', {AJAXPost:'updateSemLinker', strSem:semID}, function() {
			window.location.href = window.location.href;
		});
		
	}
	
	function semNote(semID, semLinkerID, semLinkerNote) {
		if( $('#sem_note'+semID).val() == 0 )	{
			$('#semester_note_div'+semID).append('<div class="position-relative float-left">Note: <input type="text" class="sem-note-input" id="sem_save_note'+ semLinkerID +'" value="'+ semLinkerNote +'"/></div><div class="delete-yes-no top-sem-margin" onclick="saveNote(\'' + semLinkerID + '\');">Save</div><div class="float-left left-sem-margin cursor-pointer"><img src="{dir_image}icon/close.png" title="Close" border="0"  onclick="semNote(\'' + semID + '\')"/></div>');
			$('#semester_note'+semID).show();
			$('#sem_note'+semID).val(1);
		}
		else {
			$('#semester_note_div'+semID).html('');
			$('#semester_note'+semID).hide();
			$('#sem_note'+semID).val(0);
		}
	}
	
	function saveNote(semLinkerID) {
		$('#sem_note_save'+semLinkerID).attr('src', '{dir_image}icon/loading_round.gif');
		$.post('request.php', {AJAXPost:'semLinkerNoteSave', strSemLinkerID:semLinkerID, strValue:$('#sem_save_note'+semLinkerID).val()}, function() {
			window.location.href = window.location.href;
		});
		
	}
</script>
</head>

<body>
<!-- POPUP -->{page_popup}<!-- POPUP END -->
<!-- TOP HEADER -->{page_header}<!-- TOP HEADER END -->
	<div class="main-content">
	
		<table width="0" border="0" cellspacing="0" cellpadding="0">
			<tr valign="top" align="left">
				<td width="220">
					{dean_sub_menu}
				</td>
				<td width="755">
					<div class="page-sub-content">
					<div class="float-right-back"><a href="?page=Course"><img src="{dir_image}icon/back.png" border="0"/></a></div>
					<div class="ann-top-label">{course_title}</div>
						<table width="750" border="0" cellspacing="0" cellpadding="0">
						<tr class="tr-header">
							<td width="40" class="td-label">&nbsp;</td>
							<td width="710" class="td-label">Semesters</td>
						</tr>
						<!-- BEGIN semester -->
							<tr {bgcolor} class="hover-light" valign="top">
								<td class="td-record cursor-normal">{ed_button}</td>
								<td class="td-record cursor-normal">{sem_desc_code}
								<div class="requisite-popup requisite-popup-width display-none" id="semester_note{sem_id}">
									<input type="hidden" id="sem_note{sem_id}" value="0" />
									<div id="semester_note_div{sem_id}" class="semester-div-save"></div>
								</div>
								</td>
							</tr>
						<!-- END semester -->
					</table>
					
					
					</div>
				</td>
			</tr>
		</table>
		
	</div>
<!-- FOOTER -->{page_footer}<!-- FOOTER -->
</body>
</html>
